import { apiRootPath as rootPath } from "@/configurations";

let url = `${rootPath}${process.env.NODE_ENV}`;

export const getRootUrl = () => {
  if (process.env.NODE_ENV === "production") {
    // url = rootPath.replace(/\/$/, "");
    url = window.postUrl ? window.postUrl : rootPath.replace(/\/$/, "");
  }
  return url;
};

export default getRootUrl();
